import { createApp } from "vue";
import { createFromIconfontCN } from "@ant-design/icons-vue";
import App from "./App.vue";
import router from "./router";

import "normalize.css";
import "./styles/common.scss";
import piniaPluginPersist from "pinia-plugin-persist";
import { createPinia } from "pinia";
import Antd from "ant-design-vue";
import "ant-design-vue/dist/antd.css";

import "virtual:windi.css";
import "virtual:svg-icons-register";

const app = createApp(App);
const pinia = createPinia();
pinia.use(piniaPluginPersist);

// 注册远程icon
const Icon = createFromIconfontCN({
  scriptUrl: "//at.alicdn.com/t/c/font_4028207_sx2mu11ydfe.js", // 在 iconfont.cn 上生成
});

app.use(router);
app.use(pinia);
app.use(Antd);
app.component("Icon", Icon);
app.mount("#app");
